package controllers;

import play.*;
import play.mvc.*;
import play.mvc.results.RenderText;

import java.util.*;

import org.webgene.services.GeocodingService;

import models.*;
import models.meta.Geometry;
import models.meta.MetaInformation;

public class Application extends Controller {

    /**
     * 
     */
    public static void index() {
    	GMap gmap = new GMap();
    	//37.657, 127.068
    	gmap.lat = 37.657;
    	gmap.lnt = 127.068;
    	render(gmap);
    }
    
    /**
     * URL 패턴에 따라 리스트를 출력할지 해당 사이트를 출력할 지 결정한다.
     * @param url
     */
    public static void gene(String url) {
    	
    	GMap gmap = new GMap();
    	//37.657, 127.068
    	gmap.lat = 37.657;
    	gmap.lnt = 127.068;
    	
    	WebInformation webInfo = new WebInformation();
    	webInfo.favicon = "http://www.w3schools.com/favicon.ico";
    	webInfo.url = "www.w3schools.com";
    	
    	MetaInformation metaInfo = new MetaInformation();
    	metaInfo.description = "Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building.";
    	metaInfo.keywords = "xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide";
    	
    	Geometry geometry = new GeocodingService("경기도 용인시 수지구 상현2동 성원아파트 1차 101동").getGeometry();
        render(gmap, metaInfo);
    }
}